home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 19 / CU Amiga Magazine's Super CD-ROM 19 (1998)(EMAP Images)(GB)[!][issue 1998-02].iso / CUCD / Programming / ixemul / include / sys / ttycom.h < prev    next >
C/C++ Source or Header  |  1997-10-28  |  7KB  |  139 lines

  1. /*    $NetBSD: ttycom.h,v 1.3 1994/06/29 06:45:55 cgd Exp $    */
  2.  
  3. /*-
  4.  * Copyright (c) 1982, 1986, 1990, 1993, 1994
  5.  *    The Regents of the University of California.  All rights reserved.
  6.  * (c) UNIX System Laboratories, Inc.
  7.  * All or some portions of this file are derived from material licensed
  8.  * to the University of California by American Telephone and Telegraph
  9.  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
  10.  * the permission of UNIX System Laboratories, Inc.
  11.  *
  12.  * Redistribution and use in source and binary forms, with or without
  13.  * modification, are permitted provided that the following conditions
  14.  * are met:
  15.  * 1. Redistributions of source code must retain the above copyright
  16.  *    notice, this list of conditions and the following disclaimer.
  17.  * 2. Redistributions in binary form must reproduce the above copyright
  18.  *    notice, this list of conditions and the following disclaimer in the
  19.  *    documentation and/or other materials provided with the distribution.
  20.  * 3. All advertising materials mentioning features or use of this software
  21.  *    must display the following acknowledgement:
  22.  *    This product includes software developed by the University of
  23.  *    California, Berkeley and its contributors.
  24.  * 4. Neither the name of the University nor the names of its contributors
  25.  *    may be used to endorse or promote products derived from this software
  26.  *    without specific prior written permission.
  27.  *
  28.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  29.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  30.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  31.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  32.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  33.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  34.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  35.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  36.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  37.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  38.  * SUCH DAMAGE.
  39.  *
  40.  *    @(#)ttycom.h    8.1 (Berkeley) 3/28/94
  41.  */
  42.  
  43. #ifndef    _SYS_TTYCOM_H_
  44. #define    _SYS_TTYCOM_H_
  45.  
  46. #include <sys/ioccom.h>
  47.  
  48. /*
  49.  * Tty ioctl's except for those supported only for backwards compatibility
  50.  * with the old tty driver.
  51.  */
  52.  
  53. /*
  54.  * Window/terminal size structure.  This information is stored by the kernel
  55.  * in order to provide a consistent interface, but is not used by the kernel.
  56.  */
  57. struct winsize {
  58.     unsigned short    ws_row;        /* rows, in characters */
  59.     unsigned short    ws_col;        /* columns, in characters */
  60.     unsigned short    ws_xpixel;    /* horizontal size, pixels */
  61.     unsigned short    ws_ypixel;    /* vertical size, pixels */
  62. };
  63.  
  64. #define    TIOCMODG    _IOR('t', 3, int)    /* get modem control state */
  65. #define    TIOCMODS    _IOW('t', 4, int)    /* set modem control state */
  66. #define        TIOCM_LE    0001        /* line enable */
  67. #define        TIOCM_DTR    0002        /* data terminal ready */
  68. #define        TIOCM_RTS    0004        /* request to send */
  69. #define        TIOCM_ST    0010        /* secondary transmit */
  70. #define        TIOCM_SR    0020        /* secondary receive */
  71. #define        TIOCM_CTS    0040        /* clear to send */
  72. #define        TIOCM_CAR    0100        /* carrier detect */
  73. #define        TIOCM_CD    TIOCM_CAR
  74. #define        TIOCM_RNG    0200        /* ring */
  75. #define        TIOCM_RI    TIOCM_RNG
  76. #define        TIOCM_DSR    0400        /* data set ready */
  77.                         /* 8-10 compat */
  78. #define    TIOCEXCL     _IO('t', 13)        /* set exclusive use of tty */
  79. #define    TIOCNXCL     _IO('t', 14)        /* reset exclusive use of tty */
  80.                         /* 15 unused */
  81. #define    TIOCFLUSH    _IOW('t', 16, int)    /* flush buffers */
  82.                         /* 17-18 compat */
  83. #define    TIOCGETA    _IOR('t', 19, struct termios) /* get termios struct */
  84. #define    TIOCSETA    _IOW('t', 20, struct termios) /* set termios struct */
  85. #define    TIOCSETAW    _IOW('t', 21, struct termios) /* drain output, set */
  86. #define    TIOCSETAF    _IOW('t', 22, struct termios) /* drn out, fls in, set */
  87. #define    TIOCGETD    _IOR('t', 26, int)    /* get line discipline */
  88. #define    TIOCSETD    _IOW('t', 27, int)    /* set line discipline */
  89.                         /* 127-124 compat */
  90. #define    TIOCSBRK     _IO('t', 123)        /* set break bit */
  91. #define    TIOCCBRK     _IO('t', 122)        /* clear break bit */
  92. #define    TIOCSDTR     _IO('t', 121)        /* set data terminal ready */
  93. #define    TIOCCDTR     _IO('t', 120)        /* clear data terminal ready */
  94. #define    TIOCGPGRP    _IOR('t', 119, int)    /* get pgrp of tty */
  95. #define    TIOCSPGRP    _IOW('t', 118, int)    /* set pgrp of tty */
  96.                         /* 117-116 compat */
  97. #define    TIOCOUTQ    _IOR('t', 115, int)    /* output queue size */
  98. #define    TIOCSTI        _IOW('t', 114, char)    /* simulate terminal input */
  99. #define    TIOCNOTTY     _IO('t', 113)        /* void tty association */
  100. #define    TIOCPKT        _IOW('t', 112, int)    /* pty: set/clear packet mode */
  101. #define        TIOCPKT_DATA        0x00    /* data packet */
  102. #define        TIOCPKT_FLUSHREAD    0x01    /* flush packet */
  103. #define        TIOCPKT_FLUSHWRITE    0x02    /* flush packet */
  104. #define        TIOCPKT_STOP        0x04    /* stop output */
  105. #define        TIOCPKT_START        0x08    /* start output */
  106. #define        TIOCPKT_NOSTOP        0x10    /* no more ^S, ^Q */
  107. #define        TIOCPKT_DOSTOP        0x20    /* now do ^S ^Q */
  108. #define        TIOCPKT_IOCTL        0x40    /* state change of pty driver */
  109. #define    TIOCSTOP     _IO('t', 111)        /* stop output, like ^S */
  110. #define    TIOCSTART     _IO('t', 110)        /* start output, like ^Q */
  111. #define    TIOCMSET    _IOW('t', 109, int)    /* set all modem bits */
  112. #define    TIOCMBIS    _IOW('t', 108, int)    /* bis modem bits */
  113. #define    TIOCMBIC    _IOW('t', 107, int)    /* bic modem bits */
  114. #define    TIOCMGET    _IOR('t', 106, int)    /* get all modem bits */
  115. #define    TIOCREMOTE    _IOW('t', 105, int)    /* remote input editing */
  116. #define    TIOCGWINSZ    _IOR('t', 104, struct winsize)    /* get window size */
  117. #define    TIOCSWINSZ    _IOW('t', 103, struct winsize)    /* set window size */
  118. #define    TIOCUCNTL    _IOW('t', 102, int)    /* pty: set/clr usr cntl mode */
  119. #define    TIOCSTAT    _IOW('t', 101, int)    /* generate status message */
  120. #define        UIOCCMD(n)    _IO('u', n)    /* usr cntl op "n" */
  121. #define    TIOCCONS    _IOW('t', 98, int)    /* become virtual console */
  122. #define    TIOCSCTTY     _IO('t', 97)        /* become controlling tty */
  123. #define    TIOCEXT        _IOW('t', 96, int)    /* pty: external processing */
  124. #define    TIOCSIG         _IO('t', 95)        /* pty: generate signal */
  125. #define    TIOCDRAIN     _IO('t', 94)        /* wait till output drained */
  126. #define    TIOCGFLAGS    _IOR('t', 93, int)    /* get device flags */
  127. #define    TIOCSFLAGS    _IOW('t', 92, int)    /* set device flags */
  128. #define        TIOCFLAG_SOFTCAR    0x01    /* ignore hardware carrier */
  129. #define        TIOCFLAG_CLOCAL        0x02    /* set clocal on open */
  130. #define        TIOCFLAG_CRTSCTS    0x04    /* set crtscts on open */
  131. #define        TIOCFLAG_MDMBUF        0x08    /* set mdmbuf on open */
  132.  
  133. #define    TTYDISC        0        /* termios tty line discipline */
  134. #define    TABLDISC    3        /* tablet discipline */
  135. #define    SLIPDISC    4        /* serial IP discipline */
  136. #define    PPPDISC        5        /* ppp discipline */
  137.  
  138. #endif /* !_SYS_TTYCOM_H_ */
  139.